/*
 * Scale.h
 *
 *  Created on: Dec 21, 2011
 *      Author: quotrader
 */

#ifndef SCALE_H_
#define SCALE_H_

#include <time.h>

struct unitTime{
	long unit;
	long subUnit;
};

class Scale {
public:
	timespec startTime;
	struct unitTime startUnitTime;
	bool finishAll;
	int nextPeriod;

	Scale();
	void start();
	void humanTime(char *buff, timespec t);
	void setupTime();
	timespec getRelTime();
	struct unitTime getUniTime();
	timespec getSmallestUnit();
};



#endif /* SCALE_H_ */
